package com.fare.taluo.core.domain.system.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.dayatang.hibernate.EntityRepositoryHibernate;
import com.fare.taluo.core.domain.system.VersionDetailInfoEntity;
import com.fare.taluo.core.domain.system.VersionDetailInfoEntityRepository;

@Repository
public class VersionDetailInfoEntityRepositoryImpl extends
		EntityRepositoryHibernate implements VersionDetailInfoEntityRepository {
	@Override
	public List<VersionDetailInfoEntity> findVersionDetailInfoList(
			Long versionId) {
		List<Object> params = new ArrayList<Object>();
		String sql = "from VersionDetailInfoEntity v where 1=1 and v.version_Id=? and v.flgDeleted=0 order by v.seq_Num asc";
		params.add(versionId);
		List<VersionDetailInfoEntity> versioninfoList = super.find(sql,
				params.toArray(), VersionDetailInfoEntity.class);
		return versioninfoList;
	}

	public void saveOrUpdate(VersionDetailInfoEntity versionDetailInfoEntity) {
		super.save(versionDetailInfoEntity);
	}

//	public void delete(VersionDetailInfoEntity versionDetailInfoEntity) {
//		super.save(versionDetailInfoEntity);
//	}

}
